<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="h" uri="/syzg-html"%>
<!DOCTYPE html>
<html>
<body>
<div class="modal fade bs-example-modal-lg" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">新增图片主题</h4>
      </div>
      <div class="modal-body" id="modalCore">
        <form class="form-horizontal" role="form" id="aeForm" name="aeForm">
          <fieldset>
            <!-- generate code start -->

            <div class="form-group">
              <label class="col-sm-2 control-label" for="name">主题名称</label>
              <div class="col-sm-3">
                <input type="text" id="name" name="name" value="${picsubject.name}" class="form-control" />
              </div>

              <label class="col-sm-2 control-label" for="keyword">关键字</label>
              <div class="col-sm-3">
                <input type="text" id="keyword" name="keyword" value="${picsubject.keyword}" class="form-control" />
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label" for="remark">主题描述</label>
              <div class="col-sm-8">
                <textarea id="remark" name="remark" class="form-control">${picsubject.remark}</textarea>
              </div>
            </div>
            
            <div class="checkbox">
			  <label>
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="checkbox" name="allowDown" value="${picsubject.allowDown}" onclick="myIsChecked(this)">允许下载
			  </label>
			</div>
			<div class="checkbox">
			  <label>
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="checkbox" name="allowShare" value="${picsubject.allowShare}" onclick="myIsChecked(this)">允许转载分享
			  </label>
			</div>
			<!--  
			<div class="checkbox">
			  <label>
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="checkbox" value="">隐藏摄影师信息
			  </label>
			</div>
			<div class="checkbox">
			  <label>
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="checkbox" value="">对访客隐藏拍摄时间
			  </label>
			</div>
			-->
			<!-- generate code end -->
          </fieldset>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" onclick="submitSave('add');">保存</button>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
$('#aeForm').bootstrapValidator({
  message: 'This value is not valid',
  feedbackIcons: {
      valid: 'glyphicon glyphicon-ok',
      invalid: 'glyphicon glyphicon-remove',
      validating: 'glyphicon glyphicon-refresh'
  },
  fields: {
      /*name: {
    	  group: '.col-sm-3',
          message: 'The username is not valid',
          validators: {
              notEmpty: {
                  message: 'The username is required and cannot be empty'
              },
              stringLength: {
                  min: 6,
                  max: 30,
                  message: 'The username must be more than 6 and less than 30 characters long'
              }
          }
      },
      email: {
    	  group: '.col-sm-3',
          validators: {
              emailAddress: {
                  message: 'The input is not a valid email address'
              }
          }
      }*/
  	}
}).on('success.form.bv', function(e, data) {
	FormFunction.submitSave('add');
});
</script>
</body>
</html>

